Optimal. Leaf size=159 \[ -\frac {8 \sqrt [4]{-1} a^3 \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{d^{9/2} f}-\frac {32 i a^3}{35 d^2 f (d \tan (e+f x))^{5/2}}+\frac {8 a^3}{3 d^3 f (d \tan (e+f x))^{3/2}}+\frac {8 i a^3}{d^4 f \sqrt {d \tan (e+f x)}}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right )}{7 d f (d \tan (e+f x))^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3634, 3672,
3610, 3614, 211} \begin {gather*} -\frac {8 \sqrt [4]{-1} a^3 \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{d^{9/2} f}+\frac {8 i a^3}{d^4 f \sqrt {d \tan (e+f x)}}+\frac {8 a^3}{3 d^3 f (d \tan (e+f x))^{3/2}}-\frac {32 i a^3}{35 d^2 f (d \tan (e+f x))^{5/2}}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right )}{7 d f (d \tan (e+f x))^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3610
Rule 3614
Rule 3634
Rule 3672
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^3}{(d \tan (e+f x))^{9/2}} \, dx &=-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right )}{7 d f (d \tan (e+f x))^{7/2}}-\frac {2 \int \frac {(a+i a \tan (e+f x)) \left (-8 i a^2 d+6 a^2 d \tan (e+f x)\right )}{(d \tan (e+f x))^{7/2}} \, dx}{7 d^2}\\ &=-\frac {32 i a^3}{35 d^2 f (d \tan (e+f x))^{5/2}}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right )}{7 d f (d \tan (e+f x))^{7/2}}-\frac {2 \int \frac {14 a^3 d^2+14 i a^3 d^2 \tan (e+f x)}{(d \tan (e+f x))^{5/2}} \, dx}{7 d^4}\\ &=-\frac {32 i a^3}{35 d^2 f (d \tan (e+f x))^{5/2}}+\frac {8 a^3}{3 d^3 f (d \tan (e+f x))^{3/2}}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right )}{7 d f (d \tan (e+f x))^{7/2}}-\frac {2 \int \frac {14 i a^3 d^3-14 a^3 d^3 \tan (e+f x)}{(d \tan (e+f x))^{3/2}} \, dx}{7 d^6}\\ &=-\frac {32 i a^3}{35 d^2 f (d \tan (e+f x))^{5/2}}+\frac {8 a^3}{3 d^3 f (d \tan (e+f x))^{3/2}}+\frac {8 i a^3}{d^4 f \sqrt {d \tan (e+f x)}}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right )}{7 d f (d \tan (e+f x))^{7/2}}-\frac {2 \int \frac {-14 a^3 d^4-14 i a^3 d^4 \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{7 d^8}\\ &=-\frac {32 i a^3}{35 d^2 f (d \tan (e+f x))^{5/2}}+\frac {8 a^3}{3 d^3 f (d \tan (e+f x))^{3/2}}+\frac {8 i a^3}{d^4 f \sqrt {d \tan (e+f x)}}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right )}{7 d f (d \tan (e+f x))^{7/2}}-\frac {\left (112 a^6\right ) \text {Subst}\left (\int \frac {1}{-14 a^3 d^5+14 i a^3 d^4 x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}\\ &=-\frac {8 \sqrt [4]{-1} a^3 \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{d^{9/2} f}-\frac {32 i a^3}{35 d^2 f (d \tan (e+f x))^{5/2}}+\frac {8 a^3}{3 d^3 f (d \tan (e+f x))^{3/2}}+\frac {8 i a^3}{d^4 f \sqrt {d \tan (e+f x)}}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right )}{7 d f (d \tan (e+f x))^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(416\) vs. \(2(159)=318\).
time = 7.70, size = 416, normalized size = 2.62 \begin {gather*} \frac {\left (\csc (e) \csc ^2(e+f x) (63 \cos (e)+170 i \sin (e)) \left (-\frac {2}{105} i \cos (3 e)-\frac {2}{105} \sin (3 e)\right )+i \csc (e) (483 \cos (e)+155 i \sin (e)) \left (\frac {2}{105} \cos (3 e)-\frac {2}{105} i \sin (3 e)\right )+\csc ^4(e+f x) \left (-\frac {2}{7} \cos (3 e)+\frac {2}{7} i \sin (3 e)\right )+i \csc (e) \csc ^3(e+f x) \left (\frac {6}{5} \cos (3 e)-\frac {6}{5} i \sin (3 e)\right ) \sin (f x)-i \csc (e) \csc (e+f x) \left (\frac {46}{5} \cos (3 e)-\frac {46}{5} i \sin (3 e)\right ) \sin (f x)\right ) \sin ^3(e+f x) \tan ^2(e+f x) (a+i a \tan (e+f x))^3}{f (\cos (f x)+i \sin (f x))^3 (d \tan (e+f x))^{9/2}}+\frac {8 e^{-3 i e} \sqrt {-\frac {i \left (-1+e^{2 i (e+f x)}\right )}{1+e^{2 i (e+f x)}}} \tanh ^{-1}\left (\sqrt {\frac {-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}}\right ) \cos ^3(e+f x) \tan ^{\frac {9}{2}}(e+f x) (a+i a \tan (e+f x))^3}{\sqrt {\frac {-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}} f (\cos (f x)+i \sin (f x))^3 (d \tan (e+f x))^{9/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 340 vs. \(2 (132 ) = 264\).
time = 0.12, size = 341, normalized size = 2.14
method | result | size |
derivativedivides | \(\frac {2 a^{3} \left (\frac {\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{2 d}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{2 \left (d^{2}\right )^{\frac {1}{4}}}}{d^{2}}-\frac {3 i}{5 \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}-\frac {d}{7 \left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}+\frac {4 i}{d^{2} \sqrt {d \tan \left (f x +e \right )}}+\frac {4}{3 d \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}\right )}{f \,d^{2}}\) | \(341\) |
default | \(\frac {2 a^{3} \left (\frac {\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{2 d}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{2 \left (d^{2}\right )^{\frac {1}{4}}}}{d^{2}}-\frac {3 i}{5 \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}-\frac {d}{7 \left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}+\frac {4 i}{d^{2} \sqrt {d \tan \left (f x +e \right )}}+\frac {4}{3 d \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}\right )}{f \,d^{2}}\) | \(341\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.54, size = 245, normalized size = 1.54 \begin {gather*} \frac {\frac {105 \, a^{3} {\left (\frac {\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (i - 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} + \frac {\left (i - 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )}}{d^{3}} - \frac {2 \, {\left (-420 i \, a^{3} d^{3} \tan \left (f x + e\right )^{3} - 140 \, a^{3} d^{3} \tan \left (f x + e\right )^{2} + 63 i \, a^{3} d^{3} \tan \left (f x + e\right ) + 15 \, a^{3} d^{3}\right )}}{\left (d \tan \left (f x + e\right )\right )^{\frac {7}{2}} d^{3}}}{105 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 549 vs. \(2 (137) = 274\).
time = 0.41, size = 549, normalized size = 3.45 \begin {gather*} \frac {105 \, {\left (d^{5} f e^{\left (8 i \, f x + 8 i \, e\right )} - 4 \, d^{5} f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, d^{5} f e^{\left (4 i \, f x + 4 i \, e\right )} - 4 \, d^{5} f e^{\left (2 i \, f x + 2 i \, e\right )} + d^{5} f\right )} \sqrt {-\frac {64 i \, a^{6}}{d^{9} f^{2}}} \log \left (\frac {{\left (-8 i \, a^{3} d e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (d^{5} f e^{\left (2 i \, f x + 2 i \, e\right )} + d^{5} f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {64 i \, a^{6}}{d^{9} f^{2}}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a^{3}}\right ) - 105 \, {\left (d^{5} f e^{\left (8 i \, f x + 8 i \, e\right )} - 4 \, d^{5} f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, d^{5} f e^{\left (4 i \, f x + 4 i \, e\right )} - 4 \, d^{5} f e^{\left (2 i \, f x + 2 i \, e\right )} + d^{5} f\right )} \sqrt {-\frac {64 i \, a^{6}}{d^{9} f^{2}}} \log \left (\frac {{\left (-8 i \, a^{3} d e^{\left (2 i \, f x + 2 i \, e\right )} - {\left (d^{5} f e^{\left (2 i \, f x + 2 i \, e\right )} + d^{5} f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {64 i \, a^{6}}{d^{9} f^{2}}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a^{3}}\right ) - 16 \, {\left (319 \, a^{3} e^{\left (8 i \, f x + 8 i \, e\right )} - 327 \, a^{3} e^{\left (6 i \, f x + 6 i \, e\right )} - 95 \, a^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + 387 \, a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - 164 \, a^{3}\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{420 \, {\left (d^{5} f e^{\left (8 i \, f x + 8 i \, e\right )} - 4 \, d^{5} f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, d^{5} f e^{\left (4 i \, f x + 4 i \, e\right )} - 4 \, d^{5} f e^{\left (2 i \, f x + 2 i \, e\right )} + d^{5} f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - i a^{3} \left (\int \frac {i}{\left (d \tan {\left (e + f x \right )}\right )^{\frac {9}{2}}}\, dx + \int \left (- \frac {3 \tan {\left (e + f x \right )}}{\left (d \tan {\left (e + f x \right )}\right )^{\frac {9}{2}}}\right )\, dx + \int \frac {\tan ^{3}{\left (e + f x \right )}}{\left (d \tan {\left (e + f x \right )}\right )^{\frac {9}{2}}}\, dx + \int \left (- \frac {3 i \tan ^{2}{\left (e + f x \right )}}{\left (d \tan {\left (e + f x \right )}\right )^{\frac {9}{2}}}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.91, size = 156, normalized size = 0.98 \begin {gather*} \frac {8 i \, \sqrt {2} a^{3} \arctan \left (\frac {8 \, \sqrt {d^{2}} \sqrt {d \tan \left (f x + e\right )}}{4 i \, \sqrt {2} d^{\frac {3}{2}} + 4 \, \sqrt {2} \sqrt {d^{2}} \sqrt {d}}\right )}{d^{\frac {9}{2}} f {\left (\frac {i \, d}{\sqrt {d^{2}}} + 1\right )}} - \frac {2 \, {\left (-420 i \, a^{3} d^{3} \tan \left (f x + e\right )^{3} - 140 \, a^{3} d^{3} \tan \left (f x + e\right )^{2} + 63 i \, a^{3} d^{3} \tan \left (f x + e\right ) + 15 \, a^{3} d^{3}\right )}}{105 \, \sqrt {d \tan \left (f x + e\right )} d^{7} f \tan \left (f x + e\right )^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.01, size = 119, normalized size = 0.75 \begin {gather*} -\frac {\frac {2\,a^3}{7\,d\,f}+\frac {a^3\,\mathrm {tan}\left (e+f\,x\right )\,6{}\mathrm {i}}{5\,d\,f}-\frac {8\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^2}{3\,d\,f}-\frac {a^3\,{\mathrm {tan}\left (e+f\,x\right )}^3\,8{}\mathrm {i}}{d\,f}}{{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{7/2}}+\frac {\sqrt {16{}\mathrm {i}}\,a^3\,\mathrm {atan}\left (\frac {\sqrt {16{}\mathrm {i}}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{4\,\sqrt {-d}}\right )\,2{}\mathrm {i}}{{\left (-d\right )}^{9/2}\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________